package com.aires.testapplicationlistener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @program: spring
 * @description: 事件发布监听器(观察者模式)
 * @author: fan zhengxiang
 * @create: 2020-11-02 20:43
 */
@Component
public class AiresApplicationListener implements ApplicationListener<ApplicationEvent> {
	@Override
	public void onApplicationEvent(ApplicationEvent event) {
		System.out.println("AiresApplicationListener接收到一个事件:"+event);
	}
}